textview: Properly delete anchored children
authorMatthias Clasen <mclasen@redhat.com>
Thu, 17 Sep 2020 02:58:58 +0000 (22:58 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 17 Sep 2020 03:01:49 +0000 (23:01 -0400)
commit7082624fd72dd42bbb1b8908195ed8b29a7baac5
treee0c86c6571b8be4cd89018966b51f89b39bb9571
parent25d30011a0cf8bf08d39f0c92d0e5b7446ce26e4
textview: Properly delete anchored children

When we remove anchors with widgets from the text
buffer, we used to call gtk_widget_destroy(), which
indirectly called gtk_container_remove() which cleared
the child properly. When gtk_widget_destroy() was
removed, we replaced the calls with gtk_widget_unparent(),
but that is not enough. Explicitly call
gtk_text_view_remove() instead - we know the parent
is a text view.
gtk/gtktextchild.c